package com.zhejiangzhengyuan.municipal_common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhejiangzhengyuan.municipal_common.entity.WarnEvent;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 警报事件表，存储物联网或人工上报的警报事件数据 Mapper 接口
 *
 * @author linju
 * @since 2019-11-22
 */
@Repository
public interface WarnEventMapper extends BaseMapper<WarnEvent> {

  int selectChartVoByTimestampAndOrigin(
      @Param("startTimestamp") String startTimestamp,
      @Param("endTimestamp") String endTimestamp,
      @Param("origin") String origin);

  int getManholeCountByReason(String reason);

  int getWaterRulerCountByReason();

  int getPumpWarnCount();

  List<WarnEvent> getAllDetailAndLocation();
}
